package ldh.im.web.dao;

import ldh.im.web.pojo.Role;
import ldh.im.web.pojo.where.RoleWhere;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author: ldh
* @date: 2019-10-25 12:35:06
*/
public interface RoleDao {

	Integer insert(Role role);

	Integer insertSelective(Role role);

	Integer updateById(Role role);
	
	Integer updateNotNullById(Role role);
	
	Integer deleteById(Long id);

	Integer updateByName(Role role);
	
	Integer updateNotNullByName(Role role);
	
	Integer deleteByName(@Param("name") String name);

	Role getById(Long id);

	List<Role> getByIds(List<Long> roleIds);

	Role getManyUsersById(Long id);

	Role getManyAuthoritysById(Long id);

	Role getByName(@Param("name") String name);

	List<Role> findByRoleWhere(RoleWhere roleWhere);
	
	Long findTotalByRoleWhere(RoleWhere roleWhere);
	
	List<Role> findJoinByRoleWhere(RoleWhere roleWhere);
	
	Long findJoinTotalByRoleWhere(RoleWhere roleWhere);
	
}
